<?php
namespace app\api\validate;

use think\Validate;

class MakeValidate extends Validate{
    protected $rule =   [
        'id'                        => 'require|integer',
        'order_id|订单ID'           => 'require|integer',
        'user_id|用户ID'            => 'require|integer',
        'to_user_id|用户ID'         => 'integer',
        'admin_id|店铺ID'           => 'require|integer',
        'goods_id|商品ID'           => 'require|integer',
        'techn_user_id|技师ID'      => 'require|integer',
        'techn_time_id|预约时间段ID' => 'require|integer',
        'curr|页数'                 => 'require|integer',
        'limit|条数'                => 'require|integer',
        'remarks|备注'              => 'length:1,255',
        'type|订单类型'             => 'require|integer',
        'make_time|预约时间'        => 'require|integer',
        'status|订单状态'           => 'require|integer',
        'cate_id|分类ID'           => 'require|integer',
    ];
    
    protected $scene = [
        'add'             => ['user_id', 'techn_user_id', 'admin_id', 'goods_id', 'techn_time_id', 'remarks', 'make_time'],
        'list'            => ['user_id', 'admin_id', 'status', 'curr', 'limit'],
        'show'            => ['order_id'],
        'pay_order'       => ['order_id'],
        'goods_order_add' => ['user_id', 'admin_id', 'goods_id', 'to_user_id', 'remarks'],
        'goods_list'      => ['user_id', 'admin_id', 'curr', 'limit'],
        'techn_list'      => ['goods_id', 'curr', 'limit'],
        'techn_list_all'  => ['admin_id'],
    ];
}